Loading
Scriptbox
 VBScript Links 
 About VBscript 
 JavaScript Links 
 About JavaScript 
 Powershell Links 
 PSCRIPT the Script Launcher 
 PowerShell Shortcut Keys 
 About Powershell 
     VBScript
    JavaScript
    Powershell
Disclaimer
Contact
Latest 10 Scripts
Script search
  :: { Category } :: 0-9ABCDEFGHIJKLMNOPQRSTUVWXYZ
         

Search Options:  Delete  One  Element  from  a  Dictionary  

 Content of Delete One Element from a Dictionary.vbs
MD5 Hash: FD608F51A604D056DB6DC665C8568E84
' Description: Demonstration script that deletes a specific key-item pair from a Script Runtime Dictionary. Script must be run on the local computer.


Set objDictionary = CreateObject("Scripting.Dictionary")

objDictionary.Add "Printer 1", "Printing"
objDictionary.Add "Printer 2", "Offline"
objDictionary.Add "Printer 3", "Printing"

colKeys = objDictionary.Keys

Wscript.Echo "First run: "
For Each strKey in colKeys
Wscript.Echo strKey
Next

objDictionary.Remove("Printer 2")
colKeys = objDictionary.Keys

Wscript.Echo VbCrLf & "Second run: "
For Each strKey in colKeys
Wscript.Echo strKey
Next

   © 2008 - 2013 Boris Toll      :: Scripts available: 6.481 ::      :: scriptbox.toll.at ::      :: powered by www.toll.at ::
  Google Entries:n/a
  Yahoo Backlinks:n/a
  Live Backlinks:n/a
  del.icio.us Bookmarks:n/a
  Technorati Links:n/a